package rocket.calendar;

import java.util.ArrayList;

/**
 * @author justin
 * @version
 *This can and will hold years
 */
public class Calendar {
	
	private ArrayList<Year> years;

	public Calendar(){
		this(2011);
	}
	
	/**
	 * @param initialYear
	 */
	public Calendar(int initialYear){
		this.years = new ArrayList<Year>();
		//Gets the initialYear from the database, other years are gotten in get() if necessary
	}
	
	//I don't think we need months if we are just making a list of 365 days.
	/**
	 * @param year
	 * @param day
	 */
	public Day get(int year, /* int month, */int day) {
		for (Year y: years){
			if (y.theYear() == year) return y.getDay(day);
		}

		final Year y = new Year(year);
		years.add(y);
		return y.getDay(day);
	}
	
	public String toString(){
		return "Calendar";
	}
}
